<template>
  <div id="login-app">
    <div class="img-div">
      <!-- 图片 -->
      <img src="../images/login.png" alt="" />
    </div>
    <div class="login-div">
      <div class="login-area">
        <h4>欢迎登录创思设备管理系统</h4>
        <form class="login-form" action="">
          <div style="margin: 5px">邮箱</div>
          <input class="one" type="text" v-model="email" />
          <div style="margin: 5px">密码</div>
          <input class="one" type="password" v-model="password" />
          <div class="remember-div">
            <input class="radio-input" type="radio" />&nbsp;&nbsp;<label for=""
              >记住我</label
            >
            <span class="forget" @click="forgetPassword">忘记密码</span>
          </div>
          <button @click="login">登录</button>
        </form>
        <div class="no-account">
          你还没有账号?&nbsp;<span @click="toRegister">注册账号</span>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      email: "",
      password: "",
    };
  },

  methods: {
    // 去注册页面
    toRegister() {
      this.$router.push("/register");
    },
    // 登录方法
    login() {
      alert("登录");
    },
    // 忘记密码
    forgetPassword() {
      this.$router.push("/checkEmail");
    },
    //
  },
};
</script>

<style>
#login-app {
  width: 720px;
  height: 360px;
  display: flex;
  background: white;
  font-family: Roboto;
  box-sizing: border-box;
}
.img-div {
  width: 50%;
  height: 100%;
  background-color: #9a9aeb;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}
.login-div {
  width: 50%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
  position: relative;
}

.login-form {
  margin-left: 5px;
  font-size: 12px;
  margin-bottom: 15px;
}

.no-account {
  text-align: center;
  font-size: 10px;
  transform: translateY(30px);
}

.no-account > span {
  color: #9a9aeb;
}
.no-account > span:hover {
  cursor: pointer;
}

.forget {
  margin-left: 120px;
}

.radio-input {
  margin: 2px 0;
  float: left;
}

.one {
  border: 1px solid #9a9aeb;
  text-indent: 5px;
}

.login-area {
  position: relative;
}

.remember-div {
  margin-top: 5px;
}

img {
  width: 283.5px;
  height: 169.5px;
}

h4 {
  color: 000000;
  font-size: 16px;
  margin-left: 16px;
}

button {
  background-color: black;
  color: white;
  width: 223px;
  height: 27.5px;
  border-radius: 5px;
  font-size: 12px;
  margin-top: 2px;
}

button:hover {
  cursor: pointer;
}

@media screen and(min-width: 720px) {
  #login-app {
    width: 500px;
  }
}
</style>